import scrapy

class LessonSpider(scrapy.Spider):
    name = 'lesson'
    allowed_domains = ['https://www.imooc.com/course/list']
    start_urls = ['https://www.imooc.com/course/list']

    def parse(self, response):
        print(response.status)
        biaoti = response.xpath("//div[@class='img']/@style").getall()
        print(biaoti)
        xzcs = response.xpath("//p[@class='title ellipsis2']/text()").getall()
        print(xzcs)
        tplj = response.xpath("//a[@class='item free ']/p[2]/text()").getall()
        print(tplj)
        danjia = response.xpath("//span[@class='l']/text()").getall()
        print(danjia)


import scrapy

class LessonSpider(scrapy.Spider):
    name = 'lesson'
    allowed_domains = ['http://www.1ppt.com/moban/']
    start_urls = ['http://www.1ppt.com/moban/']

    def parse(self, response):
        print(response.status)
        biaoti = response.xpath("//dl[@class='dlbox']/dd/ul/li/h2/a/text()").getall()
        print(biaoti)
        xzcs = response.xpath("//ul[@class='tplist']/li/span/text()[2]").getall()
        print(xzcs)
        tplj = response.xpath("//ul[@class='tplist']/li/a/img/@src").getall()
        print(tplj)


import scrapy

class LessonSpider(scrapy.Spider):
    name = 'lesson'
    allowed_domains = ['https://jh.lianjia.com/ershoufang/']
    start_urls = ['https://jh.lianjia.com/ershoufang/']

    def parse(self, response):
        print(response.status)
        biaoti = response.xpath("//div[@class='title']/a/text()").getall()
        print(biaoti)
        xzcs = response.xpath("//div[@class='houseInfo']/text()").getall()
        print(xzcs)
        tplj = response.xpath("//div[@class='totalPrice totalPrice2']/span/text()").getall()
        print(tplj)
        danjia = response.xpath("//div[@class='unitPrice']/span/text()").getall()
        print(danjia)

import scrapy

class LessonSpider(scrapy.Spider):
    name = 'lesson'
    allowed_domains = ['https://hotel.qunar.com/']
    start_urls = ['https://hotel.qunar.com/']

    def parse(self, response):
        print(response.status)
        biaoti = response.xpath("//p[@class='name text-elli-one']/text()").getall()
        print(biaoti)
        xzcs = response.xpath("//p[@class='score']/span/text()").getall()
        print(xzcs)
        tplj = response.xpath("//p[@class='comm_num']/text()").getall()
        print(tplj)
        danjia = response.xpath("//p[@class='price']/text()").getall()
        print(danjia)


import scrapy

class LessonSpider(scrapy.Spider):
    name = 'lesson'
    allowed_domains = ['https://china.nba.com/static/data/league/playerstats_All_All_All_0_All_false_2021_2_All_Team_points_All_perGame.json']
    start_urls = ['https://china.nba.com/static/data/league/playerstats_All_All_All_0_All_false_2021_2_All_Team_points_All_perGame.json']

    def parse(self, response):
        print(response.status)
        xhtml = response.json()
        for i in range(50):
            print(xhtml['payload']['players'][i]['playerProfile']['displayName'])
            print(xhtml['payload']['players'][i]['teamProfile']['displayAbbr'])
            print(xhtml['payload']['players'][i]['statAverage']['pointsPg'])